#include "common_defs.h"
#include "Application.h"

class OpuwoApp: public D3DApplication
{
public:
	OpuwoApp( HINSTANCE in_hInstance, const std::wstring& in_rAppName, const RECT& in_rFrameRect ) throw (Exception);
	virtual ~OpuwoApp();

	virtual void Init() throw (Exception);

	virtual void OnPaint() throw (Exception);

	virtual void OnDestroy() throw (Exception);
};

OpuwoApp::OpuwoApp( HINSTANCE in_hInstance, const std::wstring& in_rAppName, const RECT& in_rFrameRect ) throw (Exception) 
	: D3DApplication(in_hInstance, in_rAppName, in_rFrameRect)
{

}

OpuwoApp::~OpuwoApp() 
{

}

void OpuwoApp::Init() throw (Exception)
{ 
	D3DApplication::Init(); 
}

void OpuwoApp::OnPaint() throw (Exception)
{
	D3DApplication::OnPaint();

	float clearColor[] = {0.7f, 0.7f, 0.7f, 1.0f};
	D_CONTEXT->ClearRenderTargetView(GRAPHICS->GetBackBuffer(), clearColor);
}

void OpuwoApp::OnDestroy() throw (Exception)
{

}

int main()
{
	RECT rect = {100,100,1124,868};
	OpuwoApp app((HINSTANCE)0 , L"Opuwo", rect); 
	app.Run();
	return 0;
}